function  calculator(i){
    var one = document.querySelector("#yi").value;
    var two = document.querySelector("#er").value;

    y = Number(one);
    e = Number(two);
    switch (i){
        case 'a':
            document.querySelector("#de").value = y + e;
            break;
        case 'b':
            document.querySelector("#de").value = y - e;
            break;
        case 'c':
            document.querySelector("#de").value = y * e;
            break;
        case 'd':
            document.querySelector("#de").value = y / e;
            break;
    }
}